﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ImportViewModelTests.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the <seealso cref="ImportViewModelTests" /> type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Client.Modules.Core.Tests.Management
{
    using System;
    using Hisaab.Business.Interfaces;
    using Hisaab.Client.Common;
    using Hisaab.Client.Common.Services;
    using Hisaab.Client.Modules.Core.Management.ViewModel;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Moq;

    /// <summary>
    /// Defines the <seealso cref="ImportViewModelTests"/> type.
    /// </summary>
    [TestClass]
    public class ImportViewModelTests
    {
        /// <summary>
        /// Selecteds the data source should raise porperty changed.
        /// </summary>
        [TestMethod]
        public void SelectedDataSourceShouldRaisePorpertyChanged()
        {
            var vm = new ImportViewModel();
            var tester = new NotifyPropertyChangedTester(vm);

            vm.SelectedDataSource = Banks.NatWest;
            tester.AssertChange(0, "SelectedDataSource");
        }

        /// <summary>
        /// Files the path should raise porperty changed.
        /// </summary>
        [TestMethod]
        public void FilePathShouldRaisePorpertyChanged()
        {
            var vm = new ImportViewModel();
            var tester = new NotifyPropertyChangedTester(vm);

            vm.FilePath = "C:\\tempfile";
            tester.AssertChange(0, "FilePath");
        }
    }
}